package com.student.education.service.impl;

import com.student.education.dao.SubjectDao;
import com.student.education.entity.Subject;
import com.student.education.service.SubjectService;
import com.student.education.to.SubjectTo;
import com.student.education.vo.SubjectVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("subjectService")
public class SubjectServiceImpl implements SubjectService {

    @Resource
    private SubjectDao subjectDao;
    @Override
    public List<Subject> queryAll(SubjectVo vo) {
        return subjectDao.queryAll(vo);
    }

    @Override
    public int add(SubjectVo vo) {
        return subjectDao.add(vo);
    }

    @Override
    public int update(Subject subject) {
        int i = subjectDao.update(subject);
        return i;
    }

    @Override
    public int delete(Integer id) {
        int i = subjectDao.delete(id);
        return i;
    }
}
